#ifndef SK_GAME_SHAPE_H
#define SK_GAME_SHAPE_H

#include <Box2D/Dynamics/b2Body.h>
#include <Box2D/Dynamics/b2Fixture.h>

#include <QString>

class QDomElement;
class QDomDocument;
class b2World;
class b2Body;

#define DEGREES_TO_RAD (3.1415925f / 180.0f)
#define PIXEL_TO_METERS 0.02f
#define METER_TO_PIXELS (1.0f / PIXEL_TO_METERS)

namespace sk
{

    class GameShape
    {
    public:
        GameShape();
        virtual ~GameShape();

        virtual void setData(void *) = 0;
        virtual int type() = 0;                                   


        void addShape();
        void serialize(QDomDocument * doc, QDomElement * e);
        bool deserialize(QDomElement * e);
        virtual void serialiseCustomShapeData(QDomDocument * doc, QDomElement * e);
        virtual bool deserialiseCustomShapeData(QDomElement * e);

        virtual QString xmlType() = 0;
        virtual b2Body * addToWorld(b2World * world);
        virtual GameShape * clone() = 0;


        b2BodyDef bodyDef;
        b2FixtureDef fixtureDef;
    };

}; //namespace sk

#endif // SK_GAME_SHAPE_H
